Sync docs config schema with what the site reads - #1084
Merged
Conversation
The published JSON Schema had drifted from the valibot schema in src/utils/config.ts and from the code that consumes the config. - Add `tab`, missing since #904 introduced tabbed docs nav. It is accepted by valibot on sections, children, and framework children, but `additionalProperties: false` meant setting it flagged a config as invalid in editors. Values come from `docsNavTabIds`. - Drop `docSearch` from `required` and mark it deprecated. Nothing reads it; the Algolia client and index are hardcoded in SearchModal.tsx. Keeping the property (rather than deleting it) means existing configs stay valid until each repo removes the block. - Describe `badge`. It only reaches the generated llms.txt; the sidebar overwrites it with framework provenance.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe documentation configuration schema now treats ChangesDocumentation configuration schema
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
KevinVandy
approved these changes
Jul 31, 2026
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
tanstack-com | 97be690 | Commit Preview URL Branch Preview URL |
Jul 31 2026, 02:31 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tanstack-docs-config.schema.jsonis the schema every library repo references from itsdocs/config.json. It had drifted from the valibot schema insrc/utils/config.tsand from the code that actually consumes the config. Three fixes, all to the JSON Schema only — no runtime behaviour changes.Add
tabMissing since #904 introduced the tabbed docs nav. valibot accepts
tabon sections, section children, and framework children (config.ts:26), andgetDocsNavTabIdreadschild.tab ?? group.tabbefore falling back to inference — but because the JSON Schema setsadditionalProperties: false, a maintainer who settabgot a validation error in their editor for using a supported feature.Added in all three positions via a shared
$defs/tabenum, sourced fromdocsNavTabIdsinsrc/utils/docsNavTabs.ts. Not added to the framework group object:useMenuConfigflattens framework children into the parent section, so a tab there would never be read.Deprecate
docSearchinstead of requiring itNothing reads it. There is no reference to
docSearchanywhere insrc, and valibot doesn't declare it — it survives parsing only becausev.objectstrips unknown keys. Search is wired to constants in the component:The values don't even match what the configs declare — same Algolia app, different search-only key, and the site queries
tanstack-testwhile every library config claimstanstack. So the schema was requiring maintainers to keep a credential block current for a feature that stopped consuming it.Note: this drops
docSearchfromrequiredand marks itdeprecated, rather than deleting the property. With top-leveladditionalProperties: false, deleting it outright would make every currently-valid config invalid in its editor until that repo removed the block. Deprecating shows a strikethrough and lets each repo delete at its own pace. Happy to do the hard removal instead once the library repos have dropped it — say the word.Describe
badgebadgewas undocumented and doesn't do what it looks like it does.useMenuConfigoverwrites it with the page's framework provenance before it reaches the sidebar:and the sidebar no longer renders it at all — that pill was removed in 9bdc880. It is still read for real in
llms.ts:317, which walks the raw config and appends it to the generated llms.txt entry. The new description says exactly that, so nobody expects a sidebar pill from it.Verification
Validated with ajv against the schema:
pnpm testpasses (136 pass, 0 fail, lint clean).Summary by CodeRabbit
docSearchsetting.docSearchis deprecated and ignored.llms.txtcontent.